<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div">
        <div class="col-sm-12 select-info">
            <form id="user-form">
                <div class="select-list">
                    <ul>
                                          <li>企业编码：<input type="text" name="qybm"/></li>
                                          <li>年度编码：<input type="text" name="ndbm"/></li>
                                          <li>乡镇编码：<input type="text" name="xm"/></li>
                                          <li>乡镇名称：<input type="text" name="xmc"/></li>
                                          <li>负责人：<input type="text" name="xfzr"/></li>
                                          <li>负责人电话：<input type="text" name="xfzrTel"/></li>
                                          <li>联络员：<input type="text" name="xlly"/></li>
                                          <li>联络员电话：<input type="text" name="xllyTel"/></li>
                                          <li>建档时间：<input type="text" name="sj"/></li>
                                          <li>建档人员：<input type="text" name="ry"/></li>
                                          <li>估产数：<input type="text" name="gcss"/></li>
                                          <li>更新时间：<input type="text" name="updatedt"/></li>
                                          <li>GUID标识：<input type="text" name="gid"/></li>
                                          <li>PC标识：<input type="text" name="ispc"/></li>
                                          <li>
                          <a class="btn btn-primary  btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                          <a class="btn btn-success  btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="module:zlXiang:export"><i class="fa fa-download"></i>&nbsp;导出</a>
                      </li>
                    </ul>
                </div>
            </form>
        </div>

		<div class="btn-group hidden-xs" id="toolbar" role="group">
			<a class="btn btn-outline btn-success" onclick="$.operate.add()" shiro:hasPermission="module:zlXiang:add">
				<i class="fa fa-plus"></i> 新增
			</a>
			<a class="btn btn-outline btn-danger" onclick="$.operate.removeAll()" shiro:hasPermission="module:zlXiang:remove">
				<i class="fa fa-trash-o"></i> 删除
			</a>
		</div>
			
		<div class="col-sm-12 select-info table-striped">
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('module:zlXiang:edit')}]];
        var removeFlag = [[${@permission.hasPermi('module:zlXiang:remove')}]];
        var prefix = ctx + "module/zlXiang"

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "乡镇基本",
                search: false,
                showExport: false,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'qybm', 
					title : '企业编码' 
				},
				{
					field : 'ndbm', 
					title : '年度编码' 
				},
				{
					field : 'xm', 
					title : '乡镇编码' 
				},
				{
					field : 'xmc', 
					title : '乡镇名称' 
				},
				{
					field : 'sj', 
					title : '建档时间' 
				},
				{
					field : 'ry', 
					title : '建档人员' 
				},
				{
					field : 'gcss', 
					title : '估产数' 
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.gid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.gid + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>